package org.hawk.gwt.ppc.parser;

/**
 * Represents block-level descriptors. There are e.g. try/catch/finally, if/else if/ else,
 * while, for, do/while, switch/case blocks.
 * 
 * @author alex.bereznevatiy@gmail.com
 *
 */
public interface BlockExpressionDescriptor extends ExpressionDescriptor {
	
	/**
	 * @return condition associated with this block expression or <code>null</code>.
	 */
	ExpressionDescriptor getCondition();
	
	/**
	 * @return block associated with this expression or <code>null</code>.
	 */
	BlockDescriptor getBody();
	
	/**
	 * @return single expression associated with this block expression or <code>null</code>.
	 */
	ExpressionDescriptor getSingleExpression();
	
	/**
	 * @return keyword marking this block.
	 */
	String getKeyword();
	
	/**
	 * @return initializer of for statement
	 */
	ExpressionDescriptor getInitializer();
	
	/**
	 * @return post-execute expression of for statement
	 */
	ExpressionDescriptor getPostExecute();
}
